//
//  UIColor+sewageColor.m
//  Sewage
//
//  Created by 优聚泰元 on 2017/6/6.
//  Copyright © 2017年 宗庆猛. All rights reserved.
//

#import "UIColor+sewageColor.h"

@implementation UIColor (sewageColor)

#pragma mark - Color from Hex
+ (instancetype)colorFromHexString:(NSString *)hexString
{
    unsigned rgbValue = 0;
    hexString = [hexString stringByReplacingOccurrencesOfString:@"#" withString:@""];
    NSScanner *scanner = [NSScanner scannerWithString:hexString];
    [scanner scanHexInt:&rgbValue];
    
    return [[self class] colorWithR:((rgbValue & 0xFF0000) >> 16) G:((rgbValue & 0xFF00) >> 8) B:(rgbValue & 0xFF) A:1.0];
}

#pragma mark - RGBA Helper method
+ (instancetype)colorWithR:(CGFloat)red G:(CGFloat)green B:(CGFloat)blue A:(CGFloat)alpha
{
    return [[self class] colorWithRed:red/255.0f green:green/255.0f blue:blue/255.0f alpha:alpha];
}

+ (instancetype)sewageColorGreen1{
    return [[self class] colorFromHexString:@"#ffffff"];
}

+ (instancetype)solarColorGreen2
{
    return [[self class] colorFromHexString:@"#2ecc71"];
}

+ (instancetype)solarColorGray1
{
    return [[self class] colorFromHexString:@"#666666"];
}
+ (instancetype)solarColorGray2
{
    return [[self class] colorFromHexString:@"#999999"];
}
+ (instancetype)solarColorGray3
{
    return [[self class] colorFromHexString:@"#d7d7d7"];
}
+ (instancetype)solarColorGray4
{
    return [[self class] colorFromHexString:@"#e4ecf3"];
}
+ (instancetype)solarColorGray5
{
    return [[self class] colorFromHexString:@"#f9f9f9"];
}
+ (instancetype)solarColorGray6
{
    return [[self class] colorFromHexString:@"#f0f4f7"];
}




+ (instancetype)sewageColorBule1
{
    return [[self class] colorFromHexString:@"#3399e2"];
}
+ (instancetype)sewageColorBlack1
{
    return [[self class] colorFromHexString:@"#333333"];
}
+ (instancetype)sewageColorBlack2
{
    return [[self class] colorFromHexString:@"#999999"];
}

+ (instancetype)sewageColorGray1
{
    return [[self class] colorFromHexString:@"#666666"];
}
+ (instancetype)sewageColorGray2
{
    return [[self class] colorFromHexString:@"#cccccc"];
}
+ (instancetype)sewageColorGray3
{
    return [[self class] colorFromHexString:@"#e7e7e7"];
}
+ (instancetype)sewageColorGray4
{
    return [[self class] colorFromHexString:@"#f5f5f5"];
}
+ (instancetype)sewageColorGray5
{
    return [[self class] colorFromHexString:@"#ededed"];
}
+ (instancetype)sewageColorOrange1
{
    return [[self class] colorFromHexString:@"#f67210"];
}
+ (instancetype)sewageColorRed1
{
    return [[self class] colorFromHexString:@"#ff34200"];
    
}
+ (instancetype)solarColorGreen1
{
    return [[self class] colorFromHexString:@"#1cd87a"];
}
@end
